package com.zhentao.user.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.user.dto.LoginDto;
import com.zhentao.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private ApUserService apUserService;
    @PostMapping("/login") //登入接口
    public ResponseResult login(LoginDto dto){
        return apUserService.login(dto);
    }
    @PostMapping("/save")
    public ResponseResult save(LoginDto dto){
        return apUserService.save(dto);
    }
}
